package nowcoder.written_examination.wangyi;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * bf tle...
 * @author fance
 * @date 2018/6/27 15:09
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Set<String> set = new HashSet<>();
        while (in.hasNext()) {
            int n = in.nextInt();
            for (int i = 0; i < n; i++) {
                set.add(in.next());
            }
            System.out.println(set.size());
        }

    }
}
   /*
   int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            int k = in.nextInt();
            int d = in.nextInt();
            long mul = 1;

            static int cnt = 0;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int w = in.nextInt();
            int[] v  = new int[n];
            for (int i = 0; i < n; i++) {
                v[i] = in.nextInt();
            }
            backTracking(w,new ArrayList<>(),v,0);
            System.out.println(cnt);
        }
    }
    public static void backTracking(int remain, List<Integer> tmpList,int[] v,int start) {
        if (remain < 0) {
            return;
        } else {
            cnt++;
            for (int i = start; i < v.length; i++) {
                tmpList.add(v[i]);
                remain -= v[i];
                backTracking(remain,tmpList,v,i + 1);
                tmpList.remove(tmpList.size() - 1);
                remain += v[i];
            }
        }
    }
}*/
    /*
    class Time{
    public int s;
    public int f;

    public Time(int s, int f) {
        this.s = s;
        this.f = f;
    }
}
public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            Time[] clocks = new Time[n];
            for (int i = 0; i < n; i++) {
                clocks[i] = new Time(in.nextInt(),in.nextInt());
            }
            int walk = in.nextInt();
            Time start = new Time(in.nextInt(),in.nextInt());
            Arrays.sort(clocks, new Comparator<Time>() {
                @Override
                public int compare(Time o1, Time o2) {
                    return o1.s > o2.s ? 1 : o1.s < o2.s ? -1 : o1.f > o2.f ? 1 : o1.f < o2.f ? -1 : 0;
                }
            });
            int s = start.s;
            int f = start.f - walk;
            if (f < 0) {
                f += 60;
                s -= 1;
            }
            Time last = new Time(s,f);
            for (int i = n - 1; i >= 0; i--) {
                if (last.s > clocks[i].s) {
                    System.out.println(clocks[i].s + " " + clocks[i].f);
                    break;
                } else if (last.s == clocks[i].s && last.f >= clocks[i].f) {
                    System.out.println(clocks[i].s + " " + clocks[i].f);
                    break;
                }
            }
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int k = in.nextInt();
            int cnt = 0;
            for (int i = 1; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    if (i % j >= k) {
                        cnt++;
                    }
                }
            }
            System.out.println(cnt);
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            String s = in.next();
            int leftCnt = 0;
            int rightCnt = 0;
            for (int i = 0; i < s.length(); i++) {
                if (s.charAt(i) == 'L') {
                    leftCnt++;
                } else {
                    rightCnt++;
                }
            }
            leftCnt %= 4;
            rightCnt %= 4;

            int offset = leftCnt - rightCnt;
            switch (offset) {
                case 0: System.out.println("N");break;
                case 1: System.out.println("W");break;
                case 2: System.out.println("S");break;
                case 3: System.out.println("E");break;
                case -1: System.out.println("E");break;
                case -2: System.out.println("S");break;
                case -3: System.out.println("W");break;
            }

        }
    }
}*/
    /*
    class Work {
    public int d;
    public int p;

    public Work(int d, int p) {
        this.d = d;
        this.p = p;
    }


}
public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
           int n = in.nextInt();
           int m = in.nextInt();
            Work[] works = new Work[n];
            for (int i = 0; i < n; i++) {
                works[i] = new Work(in.nextInt(),in.nextInt());
            }
            Arrays.sort(works, new Comparator<Work>() {
                @Override
                public int compare(Work o1, Work o2) {
                    if (o1.d < o2.d) {
                        return -1;
                    } else if (o1.d > o2.d) {
                        return 1;
                    } else {
                        if (o1.p < o2.p) {
                            return -1;
                        } if (o1.p > o2.p) {
                            return 1;
                        } else {
                            return 0;
                        }
                    }
                }
            });

            int[] person = new int[m];
            for (int i = 0; i < m; i++) {
                person[i] = in.nextInt();
            }
            for (int i = 0; i < m; i++) {
                int cur = person[i];
                int lo = 0;
                int hi = n - 1;
                while (lo <= hi) {
                    int mid = lo + (hi - lo) / 2;
                    if (cur < works[mid].d) {
                        hi = mid - 1;
                    } else {
                        lo = mid + 1;
                    }
                }

                System.out.println(works[hi].p);
            }
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String a = in.next();
            String b = in.next();
            int cnt = 0;
            for (int i = 1; i < a.length(); i++) {
                String tmp = a.substring(0,i) + b + a.substring(i);
                if (isPalindrome(tmp)) {
                    cnt++;
                }
            }
            if (isPalindrome(a + b)) {
                cnt++;
            }
            if (isPalindrome(b + a)) {
                cnt++;
            }
            System.out.println(cnt);
        }
    }
    public static boolean isPalindrome(String s) {
        int st = 0,end = s.length() - 1;
        while (st < end) {
            if (s.charAt(st++) != s.charAt(end--)) {
                return false;
            }
        }
        return true;
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            List<Character> list = new ArrayList<>(s.length());
            for (int i = 0; i < s.length(); i++) {
                if (list.contains(s.charAt(i))) {
                    continue;
                }
                list.add(s.charAt(i));
            }
            for (char c : list) {
                System.out.print(c);
            }
            System.out.println();
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            if (n > 1000) {
                n = 1000;
            }
            System.out.println(getResult(n,2));
        }
    }
    public static int getResult(int n, int m) {
        int num[] = new int[n];
        int count = n;
        int step = 1;
        int i = -1;
        while (count>0) {
            i++;
            if (i >= n) i = 0;
            if (num[i] == -1) {
                continue;
            }

            step++;
            if (step == m) {
                num[i] = -1;
                step = 0;
                count -=1;
            }

        }
        return i - 1;
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int r = in.nextInt();
            int x1 = in.nextInt();
            int y1 = in.nextInt();
            int x2 = in.nextInt();
            int y2 = in.nextInt();
            int x3 = in.nextInt();
            int y3 = in.nextInt();
            int x0 = in.nextInt();
            int y0 = in.nextInt();
            int cnt = 0;
            if ((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1) <= r * r) {
                cnt++;
            }
            if ((x0 - x2) * (x0 - x2) + (y0 - y2) * (y0 - y2) <= r * r) {
                cnt++;
            }
            if ((x0 - x3) * (x0 - x3) + (y0 - y3) * (y0 - y3) <= r * r) {
                cnt++;
            }
            System.out.println(cnt + "x");
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int a = in.nextInt();
            int[] b = new int[n];
            for (int i = 0; i < n; i++) {
                b[i] = in.nextInt();
            }
            for (int i = 0; i < n; i++) {
                if (a >= b[i]) {
                    a += b[i];
                } else {
                    a += gcd(b[i],a);
                }
            }
            System.out.println(a);
        }

    }

    public static int gcd(int m,int n) {
        if (n == 0) {
            return m;
        }
        return gcd(n,m % n);
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            double w = in.nextDouble();
            double x = in.nextDouble();
            double y = in.nextDouble();
            double z = in.nextDouble();
            Set<Double> doubleSet = new HashSet<>();
            for (double i = w; i <= x; i++) {
                for (double j = y; j <= z; j++) {
                    doubleSet.add(i / j);
                }
            }
            System.out.println(doubleSet.size());
        }
    }

}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
            int n = in.nextInt();
            int m = in.nextInt();
            Set<String> xiaoyi = new HashSet<>();
            List<String> sys = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                xiaoyi.add(in.next());
            }
            for (int i = 0; i < m; i++) {
                sys.add(in.next());
            }
            int res = 0;
            for (String s : xiaoyi) {
                if (sys.contains(s)) {
                    res += s.length() * s.length();
                }
            }
            System.out.println(res);
        in.close();
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int x = in.nextInt();
            int f = in.nextInt();
            int d = in.nextInt();
            int p = in.nextInt();
            int days = 0;
            while (f > 0 && d >= x) {
                days++;
                f--;
                d -= x;
                if (f == 0) {
                    d -= p;
                    f++;
                }
            }
            System.out.println(days);
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            StringBuilder last = new StringBuilder();
            boolean flag = true;
            for (int i = n - 1; i >= 0; i--) {
                if (flag) {
                    System.out.print(a[i] + " ");
                } else {
                    last.append(a[i]);
                }
                flag = !flag;
            }
            last.reverse();
            int i = 0;
            for (; i < last.length() - 1; i++) {
                System.out.print(last.charAt(i) + " ");
            }
            System.out.println(last.charAt(i));
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            int max = 1;
            if (s == null) {
                System.out.println(0);
            } else {
                char pre = s.charAt(0);
                int cur = 1;
                for (int i = 1; i < s.length(); i++) {
                    char c = s.charAt(i);
                    if (c != pre) {
                        cur++;
                        max = Math.max(cur,max);
                    } else {
                        cur = 1;
                    }
                    pre = c;
                }
                System.out.println(max);
            }
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            Arrays.sort(a);
            boolean flag = false;
            if (n < 2) {
                System.out.println("Possible");
            } else {
                int d = a[0] - a[1];
                for (int i = 1; i < n - 1; i++) {
                    if (a[i] - a[i + 1] != d) {
                        flag = true;
                        break;
                    }
                }
                if (flag) {
                    System.out.println("Impossible");
                } else {
                    System.out.println("Possible");
                }
            }

        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            Set<Character> set = new HashSet<>();
            for (int i = 0; i < s.length(); i++) {
                set.add(s.charAt(i));
            }
            if (set.size() < 3) {
                System.out.println(set.size());
            } else {
                System.out.println(0);
            }
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int x = in.nextInt();
            int y = in.nextInt();
            int z = in.nextInt();
            int k = in.nextInt();
            int a = ((x + z) / 2);
            int b = ((y + k) / 2);
            int c = ((k - y) / 2);
            if (a - b == x && b - c == y &&
                    a + b == z &&
                    b + c == k) {
                System.out.println(a +" "
                        + b +" " + c);
            } else {
                System.out.println("NO");
            }
        }
    }
}*/
  /*  public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int x = in.nextInt();
            long sum = 0;
            for (int i = 1; i <= x; i++) {
                if (i % 2 == 0) {
                    sum += getMaxSub(i);
                } else {
                    sum += i;
                }
            }
            System.out.println(sum);
        }
    }
    public static int getMaxSub(int n) {
        for (int i = n - 1; i > 0; i -= 2) {
            if (n % i == 0) {
                return i;
            }
        }
        return -1;
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int x = in.nextInt();
            int y = in.nextInt();
            System.out.println(rev(rev(x) + rev(y)));
        }
    }
    public static int rev(int n) {
        StringBuilder stringBuilder = new StringBuilder(String.valueOf(n));
        return Integer.valueOf(stringBuilder.reverse().toString());
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            if (n < 3) {
                System.out.println((int)Math.pow(3,n));
            } else {
                System.out.println((int)(Math.pow(3,n) - n * (n - 1) * (n - 2)));
            }
        }
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int m = in.nextInt();
            int cur = n;
            int next = n + maxSub(n);
            int step = 0;
            for (int i = n + 1; i <= m; i++) {
                if (cur < i) {
                    cur = next;
                    step++;
                }
                next = Math.max(next,i + maxSub(i));
            }
            System.out.println(step);
        }
    }
    public static int maxSub(int n) {
        for (int i = n - 1; i > 1; i--) {
            if (n % i == 0) {
                return i;
            }
        }
        return -1;
    }
}*/
   /* public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int n = in.nextInt();
            int r = (int) Math.sqrt(n);
            int cnt = 0;
            for (double i = 0; i <= r; i++) {
                for (double j = 0; j <= r; j++) {
                    if ((i * i + j * j) == n) {
                        cnt++;
                    }
                }
            }
            if (r * r == n) {
                System.out.println(cnt * 4 - 4);
            } else {
                System.out.println(cnt * 4);
            }
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            String s = in.next();
            double cnt = 1;
            char cur = s.charAt(0);
            for (int i = 1; i < s.length(); i++) {
                if (s.charAt(i) == cur) {
                    continue;
                }
                cnt++;
                cur = s.charAt(i);
            }
            double res = s.length() / cnt;
            System.out.printf("%.2f",res);
        }
    }
}*/
    /*public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            StringBuilder stringBuilder = new StringBuilder(String.valueOf(n));
            int res = Integer.valueOf(stringBuilder.reverse().toString());
            System.out.println(res + n);
        }
    }

}*/
   /* public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int k = scanner.nextInt();
            int cnt = 0;
            for (int i = 0; i <= n; i++) {
                for (int j = 1; j <= n; j++) {
                    if (i % j >= k) {
                        cnt++;
                    }
                }
            }
            System.out.println(cnt);
        }

    }
}*/
